#include "dialog.h"
#include <QLabel>
#include <QPushButton>
#include <QVBoxLayout>
Dialog::Dialog(QWidget* parent):QDialog(parent)
{
    //
    QLabel* label = new QLabel("自定义对话框");
    QPushButton* button = new QPushButton("点击关闭对话框");
    QVBoxLayout* layout = new QVBoxLayout();
    layout->addWidget(label);
    layout->addWidget(button);

    this->setLayout(layout);

    connect(button,&QPushButton::clicked,this,&Dialog::close);
}
